

@RestController
@RequestMapping("/fmsFormulaManage")
public class FmsFormulaManageController {

    @Resource
    private FmsFormulaManageService fmsFormulaManageService;


    /**
     * 获取 FmsFormulaManage 分页列表
     */
    @GetMapping("/pagination")
    public Ret getFmsFormulaManagePagination( PaginationVo paginationVo, FmsFormulaManageQuery fmsFormulaManageQuery ) throws Exception {
        IPage page = fmsFormulaManageService.getFmsFormulaManagePagination(paginationVo, fmsFormulaManageQuery );
        return Ret.toPage(page);
    }


    /**
     * 获取 FmsFormulaManage 所有数据
     */
    @GetMapping("/all")
    public Ret getFmsFormulaManageAllList( FmsFormulaManageQuery fmsFormulaManageQuery ) throws Exception {
        List<FmsFormulaManageEntity> list = fmsFormulaManageService.getFmsFormulaManageAllList( fmsFormulaManageQuery );
        return Ret.ok(list);
    }



    /**
     * 获取 FmsFormulaManage 详情
    */
   @GetMapping("/{id}")
   public Ret getFmsFormulaManageDetail(@PathVariable Long id) throws Exception {

       FmsFormulaManageEntity fmsFormulaManage = fmsFormulaManageService.getFmsFormulaManageDetail(id);
       return Ret.ok(fmsFormulaManage);
   }


    /**
     * 新增 FmsFormulaManage
     * */
    @PostMapping("")
    public Ret addFmsFormulaManage(@RequestBody FmsFormulaManageVo fmsFormulaManageVo) throws Exception {

        fmsFormulaManageService.addFmsFormulaManage(fmsFormulaManageVo);
        return Ret.ok();
    }


    /**
     * 更新 FmsFormulaManage
     * */
    @PutMapping("")
    public Ret updateFmsFormulaManage(@RequestBody FmsFormulaManageVo fmsFormulaManageVo) throws Exception {

        fmsFormulaManageService.updateFmsFormulaManage(fmsFormulaManageVo);
        return Ret.ok();
    }


    /**
     * 删除 FmsFormulaManage
     * */
    @PostMapping("/batchRemove")
    public Ret batchRemoveFmsFormulaManage( @RequestBody List<Long> ids ) throws Exception {

        fmsFormulaManageService.batchRemoveFmsFormulaManage(ids);
        return Ret.ok();
    }
}

  